Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

f(j(x, y), y) → g(f(x, k(y)))
f(x, h1(y, z)) → h2(0, x, h1(y, z))
g(h2(x, y, h1(z, u))) → h2(s(x), y, h1(z, u))
h2(x, j(y, h1(z, u)), h1(z, u)) → h2(s(x), y, h1(s(z), u))
i(f(x, h(y))) → y
i(h2(s(x), y, h1(x, z))) → z
k(h(x)) → h1(0, x)
k(h1(x, y)) → h1(s(x), y)

Q is empty.


QTRS
  ↳ DirectTerminationProof

Q restricted rewrite system:
The TRS R consists of the following rules:

f(j(x, y), y) → g(f(x, k(y)))
f(x, h1(y, z)) → h2(0, x, h1(y, z))
g(h2(x, y, h1(z, u))) → h2(s(x), y, h1(z, u))
h2(x, j(y, h1(z, u)), h1(z, u)) → h2(s(x), y, h1(s(z), u))
i(f(x, h(y))) → y
i(h2(s(x), y, h1(x, z))) → z
k(h(x)) → h1(0, x)
k(h1(x, y)) → h1(s(x), y)

Q is empty.

We use [23] with the following order to prove termination.

Lexicographic path order with status [19].
Quasi-Precedence:
[f2, 0, h1] > g1 > [j2, k1, h12] > h23 > s1
i1 > s1

Status:
h1: [1]
j2: [2,1]
i1: multiset
k1: [1]
h23: [2,1,3]
f2: [1,2]
h12: [2,1]
0: multiset
s1: [1]
g1: [1]